#include<iostream>
#include<string>
#include<fstream>

#define FILENAME "log.txt"

using namespace std;

int main()
{
  std::ofstream out(FILENAME, std::ios::binary);
  if(!out.is_open()) return 1;
  string message("hello c++\n");
  out.write(message.c_str(), message.size());

  out.close();
  return 0;
}









 




